
<form name="frmBook" id='frmBook'  type="POST">
	<table class="formtable" id="formtable-frmBook" border=1>
		<tr>
			<td id="titlebar">
				<table>
					<tr>
						<td>
							<img src="images/book.png"/>
						</td>
						<td id="titlecaption">
							Buku
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td style="padding:6px;">
				<table class="inputform" style="padding:2px;">
					<tr>
						<td style="width:150px;">Tanggal Catat</td>
						<td>
							<select name="cboBukuTanggalCatat" id="cboBukuTanggalCatat" style="width:50px;">
								<?php
								for ($i=1;$i<=31;$i++){
									$tanggal = sprintf('%02s',$i);
								?>
								<option value="<?php echo $tanggal; ?>" <?php if($tanggal==date('j')) echo " selected"; ?>>
								<?php echo $tanggal; ?></option>
								<?php }	?>
							</select>
							<select id="cboBukuBulanCatat" name="cboBukuBulanCatat" style="width:130px;">
								<?php
								for ($i = 1; $i <= 12; $i++)
								{
									$dd="";
									$dd = '<option value="'.$i.'"';
									$j = $i;
									
									if  ($j == date('n', time())) {
										$dd .= " selected ";
									}
									
									$mon = date("F", mktime(0, 0, 0, $i+1, 0, 0, 0));
									$dd .= '>'.$mon.'</option>';
									echo $dd;
								}
								?>
							</select>
							<select id="cboBukuTahunCatat" name="cboBukuTahunCatat" style="width:65px;">
								<?php
								$tahunsekarang = date('Y') + 2;
								for ($i=0;$i<=12;$i++){
									$tahun = $tahunsekarang - $i;
								?>
									<option value="<?php echo $tahun; ?>" 
								<?php if ($tahun == date('Y')) {echo " selected";};  ?> ><?php echo $tahun; ?></option>
								<?php
								}
								?>
							</select>
						</td>
						<td></td>
						<td>Sampul</td>
					</tr>
					<tr>
						<td>Kode Buku</td>
						<td><input type="text" name="txtBukuKodeBuku" id="txtBukuKodeBuku" startfocus='0'/></td>
						<td style="padding:1px;width:20px">&nbsp;</td>
						<td style="padding:1px;width:200px" rowspan="10">
							<div id="sampul">
								
							</div>
						</td>
					</tr>
					<tr>
						<td>ISBN</td>
						<td><input type="text" name="txtBukuISBN" id="txtBukuISBN" /></td>
					</tr>
					<tr>
						<td>Kelompok</td>
						<td>
							<select name="cboBukuKelompok" id="cboBukuKelompok" >
							</select>
						</td>
					</tr>
					<tr>
						<td>Judul</td>
						<td><textarea name="txtBukuJudul" id="txtBukuJudul" ></textarea></td>
					</tr>
					<tr>
						<td>Penulis</td>
						<td>
							<select name="cboBukuPenulis" id="cboBukuPenulis" >
							</select>
						</td>
					</tr>
					<tr>
						<td>Tahun</td>
						<td>
							<select id="cboBukuTahun" name="cboBukuTahun">
								<?php
								$tahunsekarang = date('Y') + 2;
								for ($i=0;$i<=12;$i++){
									$tahun = $tahunsekarang - $i;
								?>
									<option value="<?php echo $tahun; ?>" 
									<?php if ($tahun == date('Y')) {echo " selected";};  ?> ><?php echo $tahun; ?></option>
									<?php
								}
								?>
							</select>
						</td>
					</tr>
					<tr>
						<td>Penerbit</td>
						<td>
							<select name="cboBukuPenerbit" id="cboBukuPenerbit">
							</select>
						</td>
					</tr>
					<tr>
						<td>Banyaknya</td>
						<td><input type="text" name="txtQTY" id="txtQTY" style="text-align:right" maxlength='4' /></td>
					</tr>
					<tr>
						<td>Rak Simpan</td>
						<td>
							<select name="cboBukuRak" id="cboBukuRak">
							</select>
						</td>
					</tr>
					<tr>
						<td>Harga Sewa</td>
						<td><input type="text" name="txtBukuHarga" id="txtBukuHarga" style="text-align:right" /></td>
					</tr>
					<tr>
						<td>Batas Lama Sewa</td>
						<td><input type="text" name="txtBukuLama" id="txtBukuLama" style="text-align:right" maxlength="2" /></td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</form>
